home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 035a / bpq404.zip / HOSTMODE.DOC < prev    next >
Text File  |  1990-04-09  |  4KB  |  148 lines

  1. The BPQ Switch supports a simplified subset of PK232 Hostmode Commands.
  2. This document is intended to give a brief intorduction to Hostmode, and
  3. define the commands supported by the switch. For full details of the 
  4. PK232 implementation, see the appropriate supplier's manuals.
  5.  
  6.  
  7. With Hostmode, a single (virtual) TNC Port to the switch may support
  8. several simultaneous conversations. Messages are passed to and from the
  9. switch as character strings, with start and end frame delimiters. The
  10. first byte specifies the type of data (command, status reponse, user 
  11. data, etc), and the channel number. The system allows two basic modes of 
  12. operation, polled or unpolled. With Polled, data is only sent from the
  13. switch to the application on receipt of a poll. With unpolled, the switch
  14. may send stuff to the application whenever it likes. Each method has its
  15. advantages, and indeed the two BBS systems that I know of that use Hostmode
  16. (G8UFQ and AA4RE) have chosen different modes. Unfortunately neither issues
  17. the command which defines which mode to run in, so I have provided two
  18. Hostmode options, PK232/AA4RE (polled), and PK232/UFQ (unpolled). There 
  19. are other minor differences between my options, which will be mentioned
  20. when the commands that they affect are discussed.
  21.  
  22. The basic frame format is
  23.  
  24.     SOH (HEX 01)  CONTROL   Data   ETB (HEX 17)
  25.  
  26.  
  27. Any 01h, 10h, or 17h bytes appearing in the packet must be preceeded
  28. by a 10h escape char, to avoid confusion with framing charaters.
  29.  
  30. The CONTROL byte has the following (hex) format:
  31.  
  32.   Appl - Switch
  33.  
  34.     2x        Data for channel x
  35.     4x        Command to channel x
  36.     4F        General (non channel specific) command.
  37.  
  38.   Switch - Appl
  39.  
  40.     3x        Data from channel x
  41.     4x        Link status (reply to CO)
  42.     4F        General command reply.
  43.     5x        Link status report from channel x
  44.     5F        Status Errors
  45.  
  46.  
  47.   3F is used for monitored data (RX), and 29 for Unproto stuff (TX)
  48.  
  49.  
  50. The most important message formats are as follows:
  51.  
  52. TNC Command:
  53.  
  54.     SOH 4F C C p p..  ETB    Where CC is the command code, and pp... params.
  55.  
  56. The Switch will respond immediately (ie without waiting for a poll) with
  57.  
  58.     SOH 4F C C 00 ETB     If OK
  59.  
  60. or    SOH 4F X X 01 ETB        If invalid.
  61.  
  62. Connect:
  63.  
  64.     SOH 4x C O Callsign ETB
  65.  
  66. Note that whatever call you specify, you will just be connected to the
  67. switch. Use switch commands from then onwards.
  68.  
  69.  
  70. Session Status:
  71.  
  72.     SOH 4x C O ETB
  73.  
  74. Returns 
  75.  
  76.     SOH 4x C O a b c d e  callsign ETB
  77.  
  78.     Where a - f are hex values in range 0 - f, ORed with 30H
  79.  
  80.     a = link state-1 (ie state 5 (connected) = 34h)
  81.  
  82.     b = ax25 version (always 2 (32h))
  83.  
  84.     c = number of unacked packets outstanding
  85.  
  86.     d = number of retries (not supported - always 30h)
  87.  
  88.     e = conperm flag (not supported - always 30h)
  89.  
  90.     callsign = users callsign (if connected)
  91.  
  92.  
  93.  
  94. Session state changes (connected/disconnected) are reported as
  95.  
  96.     SOH 5x 'Text string' ETB
  97.  
  98.  
  99. When using polled mode the poll command is
  100.  
  101.     SOH 4F G G ETB
  102.  
  103. The reply with be either SOH 4F G G 00 ETB, if nothing is available, or
  104. one (any only one) data/monitored data/link status/data ack message.
  105.  
  106.  
  107. Data is send on a connected channel as
  108.  
  109.     SOH 2x (data) ETB
  110.  
  111. There is no immediate response. The system will reply with a data ack
  112. when it is able to process another frame.
  113.  
  114.     SOH 5F X X 00 ETB
  115.  
  116. The application must not send more data until this is received. Note in
  117. polled mode, the data ack is returned in response to a poll.
  118.  
  119.  
  120.  
  121.  
  122. Only a minimal subset of the full command set is implemented. The
  123. following commands are processed - others are accepted, but ignored.
  124.  
  125.  
  126.     GG    POLL
  127.  
  128.     CO    CONNECT or STATUS Request
  129.  
  130.     MN    MONITOR - MN0 means monitor off, MN1 monitor on
  131.         MN2 also set MCOM on. Defaults on in UFQ mode, 
  132.         off in AA4RE mode
  133.  
  134.     ZM    Monitor port mask - as normal tnc MMASK command
  135.  
  136.     UR    Users - set max concurrent users. In UFQ mode defaults 
  137.         to 9, in AA4RE mode to zero. The maximum is 15, but as 
  138.         the hostmode spec uses channel 9 for UNPROTO stuff, I
  139.         recommend a limit of 9.
  140.  
  141.     DI    Disconnect. If followed by S (DIS), user is returned to
  142.         the node, instead of being fully disconnected.
  143.  
  144.  
  145.  
  146. John Wiseman G8BPQ
  147. 11/3/90
  148.